Clear-patches is a command that clears the patches by resetting all patch variables to their default initial values, including setting their color to black. It is usually located in a command procedure. The shorthand version of this command is cp.
Clear-turtles is a command that removes all the turtles as well as resets the numbering of turtles. It is usually located in a command procedure. The shorthand version of this command is ct. See die for more about removing turtles from a plot.
These are only used when we do not want to use clear-all. For example, if we wanna clear the patches but keep some global variables’ values & the position of the turtles, you would use clear-patches. If we wanna clear the turtles but keep the patches and their initial values, you would use clear-turtles.
Once you mastered the clear-turtles primitive, don't stop there. Check out the resources below to improve your NetLogo skills.
turtles-ownDeclare a variable that belongs to turtles.